#include "enginelogger.h"

const QString EngineLogger::endl = "\n";

EngineLogger &EngineLogger::operator<<(const char *s)
{
  _text += QString::fromUtf8(s);
  return *this;
}

EngineLogger &EngineLogger::operator<<(const QString &s)
{
  _text += s;
  return *this;
}

EngineLogger &EngineLogger::operator<<(int i)
{
  _text += QString::number(i);
  return *this;
}

EngineLogger &EngineLogger::operator<<(ed::Attribute a)
{
  _text += (QString)a;
  return *this;
}

void EngineLogger::clear()
{
  _text.clear();
}

EngineLogger::operator QString() const
{
  return _text;
}
